<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="laborc" uri="/laborc-tags"%>
<div id="content">
	<table id="topicsList">
		<tr id="topicsList_th">
			<th>
				课题名
			</th>
			<s:if test="types!='replyResult'">
				<th>
					课题类型
				</th>
			</s:if>
			<th>
				<s:if test="types=='showChoiceTopics'||types=='topicsList'">
					出题老师
				</s:if>
				<s:else>
					选题学生
				</s:else>
			</th>
			<th>
				出题时间
			</th>
			<s:if
				test="types=='replyRecorder'||types=='examining'||types=='auditingReply'||types=='replyResult'">
				<th>
					答辩阶段
				</th>

			</s:if>

			<s:if
				test="types=='alreadyChoice'||types=='showChoiceTopics'||types=='topicsList'">

				<th>
					详情
				</th>

			</s:if>

			<s:if test="types=='examining'">
				<th>
					考核成绩
				</th>
			</s:if>
			<s:if test="types!='alreadyChoice'">

				<th>
					操作
				</th>
			</s:if>
			<s:if test="types=='display'">
				<th>
					审核状态
				</th>
			</s:if>
		</tr>
		<s:if test="topicss!=null">
			<s:iterator value="topicss" id="name" status="st">
				<tr <s:if test="#st.odd">class="topicsList_td1"</s:if>
					<s:else>class="topicsList_td2"</s:else> id="${name.topicsNum }">
					<td>
						${name.topicsName }
					</td>
					<s:if test="types!='replyResult'">
						<td>

							${name.topicsClass.topicsClassName }

						</td>
					</s:if>
					<s:if test="types=='showChoiceTopics'||types=='topicsList'">
						<td>
							<a href="javascript:void(0)"
								onclick="showTeacher('${name.teacher.teacherNum }')">${name.teacher.name
								}</a>
						</td>
					</s:if>
					<s:else>
						<td>
							<a href="javascript:void(0)"
								onclick="showStudent('${name.student.studentNum }')">${name.student.name
								}</a>
						</td>
					</s:else>
					<td>
						${name.submitTime }
					</td>
					<s:if
						test="types=='replyRecorder'||types=='examining'||types=='replyResult'">
						<td>
							<s:if test='#name.replyStage=="1"'>
							一辩
						</s:if>
							<s:elseif test='#name.replyStage=="2"'>
							二辩
						</s:elseif>
							<s:elseif test='#name.replyStage=="3"'>
							三辩
						</s:elseif>
						</td>
					</s:if>
					<s:if test="types=='auditingReply'">
						<td>
							<s:if test='#name.replyStage=="2"'>
							二辩申请
						</s:if>
							<s:elseif test='#name.replyStage=="3"'>
							三辩申请
						</s:elseif>
						</td>
					</s:if>
					<s:if test="types=='examining'">
						<td>
							<s:if test='#name.replyStage=="1"'>
								<s:select
									list="#{'0':'无成绩','1':'不及格','2':'及格','3':'中等','4':'良好','5':'优秀'}"
									value="%{#name.replyScore}" theme="simple"
									onchange="modifyScore('%{#name.topicsNum }',this)" cssStyle="*visibility:visible!important;"></s:select>
							</s:if>
							<s:else>
								<s:select list="#{'0':'无成绩','1':'不及格','2':'及格'}" theme="simple"
									value="%{#name.replyScore}"
									onchange="modifyScore('%{#name.topicsNum }',this)" cssStyle="*visibility:visible!important;"></s:select>
							</s:else>
						</td>
					</s:if>
					<s:if test="types=='alreadyChoice'">
						<td>
							<a href="javascript:void(0)"
								onclick="showTopics('${name.topicsNum }')">查看</a>
						</td>
					</s:if>
					<s:elseif test="types=='showChoiceTopics'||types=='topicsList'">
						<td>
							<a href="javascript:void(0)"
								onclick="showTopicsIntro('${name.topicsNum }')">查看</a>
						</td>
					</s:elseif>
					<s:if test="types!='alreadyChoice'">
						<s:if test="types=='showChoiceTopics'">
							<td>
								<a href="javascript:void(0)"
									onclick="openChoice('${name.topicsNum}')">选择</a>
							</td>
						</s:if>
						<s:elseif test="types=='taskBook'">
							<td>
								<a href="javascript:void(0)"
									onclick="openTaskUpload('${name.topicsNum }')">提交任务书</a>
								<a href="javascript:void(0)"
									onclick="openResourceUpload('${name.topicsNum }')">提交资料</a>
							</td>
						</s:elseif>
						<s:elseif test="types=='submintResult'">
							<td>
								<a href="javascript:void(0)"
									onclick="openReportResult('${name.topicsNum }')">提交结果</a>
							</td>
						</s:elseif>
						<s:elseif test="types=='showResult'">
							<td>
								<s:a
									href="showResultDetail.action?topicsNum=%{#name.topicsNum }"
									onclick="openShowResult()" theme="ajax"
									targets="showReportBody">查看结果</s:a>
							</td>
						</s:elseif>
						<s:elseif test="types=='records'">
							<td>
								<a href="javascript:void(0)"
									onclick="openRecords('${name.topicsNum }')">提交指导记录</a>
							</td>
						</s:elseif>
						<s:elseif test="types=='oneAuditing'">
							<td>
								<a href="javascript:void(0)"
									onclick="openOneAuditing('${name.topicsNum }','one')">提交一审表</a>
							</td>
						</s:elseif>

						<s:elseif test="types=='twoAuditing'">
							<td>
								<a href="javascript:void(0)"
									onclick="openOneAuditing('${name.topicsNum }','two')">提交二审表</a>
							</td>
						</s:elseif>
						<s:elseif test="types=='replyRecorder'">
							<td>
								<a href="javascript:void(0)"
									onclick="openReplyRecorder('${name.topicsNum }')">提交答辩记录</a>
							</td>
						</s:elseif>
						<s:elseif test="types=='examining'">
							<td>
								<a href="javascript:void(0)"
									onclick="openExaminging('${name.topicsNum }')">提交考核成绩</a>
							</td>
						</s:elseif>
						<s:elseif test="types=='auditingReply'">
							<td>
								<s:select list="#{'8':'请选择','2':'申请成功','0':'申请失败'}"
									theme="simple" 
									onchange="openAuditingReply('%{#name.topicsNum }',this)" cssStyle="*visibility:visible!important;"></s:select>
							</td>
						</s:elseif>
						<s:elseif test="types=='replyResult'">
							<td>
								<s:a
									href="reply/showReplyResult.action?topicsNum=%{#name.topicsNum }"
									onclick="openReplyResult()" theme="ajax"
									targets="showReportBody">查看结果</s:a>
							</td>
						</s:elseif>
						<s:elseif test="types=='display'">

							<td>
								<s:if test='#name.autidingState=="0"||#name.autidingState=="3"'>
									<a href="zcg/modifyTopics.action?topicsID=${name.topicsNum }"
										target="main">修改</a>
								</s:if>
								<s:else></s:else>
							</td>
						</s:elseif>

						<s:else>
							<td>
								<a href="javascript:void(0)"
									onclick="openSuggest('${name.topicsNum}','${name.teacher.teacherNum }')">审核</a>
							</td>
						</s:else>
						<s:if test="types=='display'">
							<td>
								<s:if test='#name.autidingState=="0"'>未审核</s:if>

								<s:elseif test='#name.autidingState=="1"'>审核通过</s:elseif>
								<s:elseif test='#name.autidingState=="2"'>审核未通过</s:elseif>
								<s:elseif test='#name.autidingState=="3"'>通过并待修改</s:elseif>
								<s:else>状态异常</s:else>
							</td>
						</s:if>
					</s:if>
				</tr>
			</s:iterator>
			<s:if
				test="types=='topicsList'||types=='submintResult'||types=='showChoiceTopics'">
				<tr>
					<td colspan="7" style="text-align: right;">
						<laborc:page cpage="%{cpage}" total="%{total}" url="%{url}" />
					</td>
				</tr>
			</s:if>
		</s:if>
		<s:else>
			<tr>
				<td colspan="7" style="text-align: center;">
					无任何内容
				</td>
			</tr>
		</s:else>
	</table>
</div>